//
//  BMActionAlertCell.m
//  bigmama
//
//  Created by huyuchen on 2017/8/23.
//  Copyright © 2017年 盛成文化. All rights reserved.
//

#import "BMActionAlertCell.h"

@interface BMActionAlertCell ()

@property (nonatomic, strong) UIView *lineView;

@end

@implementation BMActionAlertCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.titleLabel.textColor = ColorDefalutGray;
    self.backgroundColor = kWhiteColor;
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_lessThanOrEqualTo(SCREEN_WIDTH - 40);
    }];
}

- (void)setupLineView{
    self.lineView = [UIView new];
    self.lineView.backgroundColor = ColorSepLine;
    [self.contentView addSubview:self.lineView];
    
    [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_equalTo(0);
        make.height.mas_equalTo(0.5);
    }];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)drawRect:(CGRect)rect {
    [super drawRect:rect];
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
    
    CGContextFillRect(context, rect);
    
    //下分割线
    
//    CGContextSetStrokeColorWithColor(context,ColorSepLine.CGColor);
//    
//    CGContextStrokeRect(context,CGRectMake(0, rect.size.height, rect.size.width, 0.5f));
}

@end
